Field of the Invention
The invention relates to a method and an apparatus for processing images, and more particularly, relates to a method and an apparatus for optimizing depth information.
Description of Related Art
As image processing technology develops and thrives, stereo vision has been gradually and widely applied to a variety of fields. The stereo vision in broad terms can include two stages. In the former stage, depth information is generated by using a depth camera, a stereo camera or a method, such as a three-dimension (3D) imaging algorithm, and in the later stage, images in different vision angles are generated according to the depth information. Accordingly, in order to generate a 3D image with better visual perception, accurate depth information plays a very important role.
As for a stereoscopic imaging system having dual lenses, images in different angles related to one scene can be captured by using the dual lenses of the stereoscopic imaging system, and depth information of each object in the images may be estimated according to information of pixel difference between images captured by the left and the right lenses and distance between the two lenses. Generally, the depth information can be represented in a depth map, and depths of different objects or pixels in a two-dimensional (2D) image are represented by using depth values recorded on the depth map. Therein, a depth generation algorithm based on local-correlation and pixel-wise matching is common to the stereoscopic imaging systems having dual lenses.
However, a depth map generated based on the local-correlation may have an edge blur issue, while the pixel-wise matching method may also lead to significant calculation and great consumption in memory resources. In other words, different algorithms for generating the depth information have different accuracies and calculation amounts. Therefore, how to generate accurate depth information under a condition with a permissible calculation amount and complexity as well as to enhance quality of the 3D image generated according to the depth information has been an important goal to be achieved by the persons skilled in the field.